<?php
/**
 * GioCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@ninhgio.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2010 Gio CMS (http://www.ninhgio.com)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 */

$this->headTitle($this->TRANSLATOR->translator('zone_edit_page_title') . ' - ' .
				 $this->TRANSLATOR->translator('about_ad_title') . ' - ' . 
			     $this->TRANSLATOR->translator('common_admin_title', 'core'));
?>
<div class="content">
	<div class="box header mb0">
		<div class="head"><div></div></div>
		<h2 class="g_a_breadcump">
			<a class="fl" href="<?php echo $this->url('core_dashboard_index'); ?>"><?php echo $this->TRANSLATOR->translator('dashboard_breadcump', 'core'); ?></a>
			<small class="icon arrow_right" style="display: block;"></small>
			<a class="fl" href="javascript: void(0);"><?php echo $this->TRANSLATOR->translator('about_ad_title'); ?></a>
			<small class="icon arrow_right" style="display: block;"></small>
			<a class="fl" href="<?php echo $this->url('ad_zone_list'); ?>"><?php echo $this->TRANSLATOR->translator('zone_breadcump'); ?></a>
			<small class="icon arrow_right" style="display: block;"></small>
			<a class="fl" href="javascript: void(0);"><?php echo $this->TRANSLATOR->translator('zone_edit_breadcump'); ?></a>
			<div class="clear"></div>
		</h2>
	</div>
</div>
<div class="content">
	<div class="desc">
		<div class="body">
			<!--  -->
			<form action="<?php echo $this->url('ad_zone_edit', $this->zoneData); ?>" method="post" id="adZoneEdit">
				<h4 class="g_a_h4 fl"><?php echo $this->TRANSLATOR->translator('zone_add_guide'); ?></h4>
				<div class="fr">
					<?php if ($this->ACL->isAllowed('edit', 'zone', 'ad')) : ?>
					<a class="fl g_a_tip form_submit g_a_submit_button mr5" href="javascript: void(0);" title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_button_save_title')); ?>"></a>
					<?php endif; ?>
					<a class="fl g_a_tip g_a_cancel_button mr5" href="javascript: history.go(-1);" title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('common_back_button', 'core')); ?>"></a>
					<?php if ($this->ACL->isAllowed('list', 'zone', 'ad')) : ?>
					<a class="fl g_a_tip" href="<?php echo $this->url('ad_zone_list'); ?>" title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_list_title')); ?>">
						<img src="<?php echo $this->APP_RESOURCE_SERVER; ?>/templates/<?php echo $this->APP_TEMPLATE; ?>/skins/<?php echo $this->APP_SKIN; ?>/images/ad_zone_list_icon.png" style="padding: 0 5px 0 0;" />
					</a>
					<?php endif; ?>
					<?php if ($this->ACL->isAllowed('add', 'zone', 'ad')) : ?>
					<a class="fl g_a_tip" href="<?php echo $this->url('ad_zone_add'); ?>" title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_add_title')); ?>">
						<img src="<?php echo $this->APP_RESOURCE_SERVER; ?>/templates/<?php echo $this->APP_TEMPLATE; ?>/skins/<?php echo $this->APP_SKIN; ?>/images/ad_zone_add_icon.png" style="padding: 0 5px 0 0;" />
					</a>
					<?php endif; ?>
				</div>
				<div class="g_a_line"></div>
				<p>
					<label for="simple_input"><?php echo $this->TRANSLATOR->translator('zone_code'); ?></label>
					<input title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_code_description')); ?>" type="text" class="text w_20 g_a_tip_right" name="zone[code]" id="code" value="<?php if (isset($this->zoneData['code'])) : ?><?php echo $this->zoneData['code']; ?><?php endif; ?>" />
					<?php if (isset($this->errorMessages) && isset($this->errorMessages['code'])) : ?>
					<span class="g_a_error"><?php echo $this->TRANSLATOR->translator($this->errorMessages['code']); ?></span>
					<?php endif; ?>
					<br>
				</p>
				<p class="small">&nbsp;</p>
				<p>
					<label for="simple_input"><?php echo $this->TRANSLATOR->translator('zone_description'); ?></label>
					<input title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_description_description')); ?>" type="text" class="text w_20 g_a_tip_right" name="zone[description]" id="description" value="<?php if (isset($this->zoneData['description'])) : ?><?php echo $this->zoneData['description']; ?><?php endif; ?>" />
					<?php if (isset($this->errorMessages) && isset($this->errorMessages['description'])) : ?>
					<span class="g_a_error"><?php echo $this->TRANSLATOR->translator($this->errorMessages['description']); ?></span>
					<?php endif; ?>
					<br>
				</p>
				<p class="small">&nbsp;</p>
				<p>
					<label for="simple_input"><?php echo $this->TRANSLATOR->translator('zone_width'); ?></label>
					<input title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_width_description')); ?>" type="text" class="text w_20 g_a_tip_right" name="zone[width]" id="width" value="<?php if (isset($this->zoneData['width'])) : ?><?php echo $this->zoneData['width']; ?><?php endif; ?>" />
					<?php if (isset($this->errorMessages) && isset($this->errorMessages['width'])) : ?>
					<span class="g_a_error"><?php echo $this->TRANSLATOR->translator($this->errorMessages['width']); ?></span>
					<?php endif; ?>
					<br>
				</p>
				<p class="small">&nbsp;</p>
				<p>
					<label for="simple_input"><?php echo $this->TRANSLATOR->translator('zone_height'); ?></label>
					<input title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_height_description')); ?>" type="text" class="text w_20 g_a_tip_right" name="zone[height]" id="height" value="<?php if (isset($this->zoneData['height'])) : ?><?php echo $this->zoneData['height']; ?><?php endif; ?>" />
					<?php if (isset($this->errorMessages) && isset($this->errorMessages['height'])) : ?>
					<span class="g_a_error"><?php echo $this->TRANSLATOR->translator($this->errorMessages['height']); ?></span>
					<?php endif; ?>
					<br>
				</p>
				<p class="small">&nbsp;</p>
				<p>
					<label for="simple_input"><?php echo $this->TRANSLATOR->translator('zone_price'); ?></label>
					<input title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_price_description')); ?>" type="text" class="text w_20 g_a_tip_right" name="zone[price]" id="price" value="<?php if (isset($this->zoneData['price'])) : ?><?php echo $this->zoneData['price']; ?><?php endif; ?>" />
					<?php if (isset($this->errorMessages) && isset($this->errorMessages['price'])) : ?>
					<span class="g_a_error"><?php echo $this->TRANSLATOR->translator($this->errorMessages['price']); ?></span>
					<?php endif; ?>
					<br>
				</p>
				<p class="small">&nbsp;</p>
				<p>
					<label for="simple_input"><?php echo $this->TRANSLATOR->translator('zone_status'); ?></label>
					<select class="g_a_tip_right" id="status" name="zone[status]" title="<?php echo $this->STRING->escape($this->TRANSLATOR->translator('zone_status_description')); ?>">
						<option value="inactive"<?php if (isset($this->zoneData) && $this->zoneData['status'] == 'inactive') : ?> selected="selected"<?php endif; ?>><?php echo $this->TRANSLATOR->translator('zone_status_inactive'); ?></option>
						<option value="active"<?php if (isset($this->zoneData) && $this->zoneData['status'] == 'active') : ?> selected="selected"<?php endif; ?>><?php echo $this->TRANSLATOR->translator('zone_status_active'); ?></option>
					</select>
					<br>
				</p>
				<p class="small">&nbsp;</p>
				
				<p class="last buttons_demo">
					<?php if ($this->ACL->isAllowed('edit', 'zone', 'ad')) : ?>
					<a class="button form_submit green" href="<?php echo $this->url('ad_zone_edit', $this->zoneData); ?>"><small class="icon check"></small><span><?php echo $this->TRANSLATOR->translator('common_submit_button', 'core'); ?></span></a>
					<?php endif; ?>
					<a class="button red" href="javascript: history.go(-1);"><small class="icon cross"></small><span><?php echo $this->TRANSLATOR->translator('common_back_button', 'core'); ?></span></a>
				</p>
			</form>
			<!--  -->
			<div class="clear"></div>
		</div>
	</div>
	<div class="body_footer">
		<div class="bottom_left"><div class="bottom_right"></div></div>
	</div>
</div>
<?php if (($string = $this->MESSENGER->printMessages()) != null) : ?>
<script type="text/javascript">
Gio.Message.success('<?php echo $string; ?>');
</script>
<?php endif; ?>